package proxy.dynamic;

import proxy.dynamic.proxy.BeanDynamicProxy;

public class TestDynamicProxy {
    public static void main(String[] args) {
        // 创建目标对象
        UserDAO userDao = new UserDAOImpl();
        // 创建代理对象[jdk动态代理只能带实现类接口类]
        UserDAO proxy = (UserDAO) new BeanDynamicProxy().getBeanProxy(userDao);
        proxy.addUser();
    }
}
